//
//  VIPMallRouter.swift
//  LeGou
//
//  Created by lxm on 2022/8/5.
//

import Foundation
class VIPMallRouter {
    // 路由
      static func initialize(navigator: NavigatorProtocol) {
          // 首页
          navigator.register("xm://main/VIPMall/index") { url, values, context in
              return VIPMallIndex()
          }
          
          // 详情
          navigator.register("xm://main/VIPMall/goods_detail") { url, values, context in
              let vc = VIPGoodsDetail()
              if let context = context {
                  vc.id = JSON(context)["id"].stringValue
              }
              return vc
          }
          
          // 订单详情
          navigator.register("xm://main/VIPMall/order_detail") { url, values, context in
              let vc = VIPOrderDetail()
              if let context = context {
                  vc.orderNo = JSON(context)["orderNo"].stringValue
              }
              return vc
          }
          
          // 订单详情
          navigator.register("xm://main/VIPMall/wallet/index") { url, values, context in
              let vc = VIPMallWallet()
              return vc
          }
          
          
      }
}

